import { http } from "@/utils/http";

export const getSettlement = params => {
  return http.request("get", "/api/business/commission_settlement/listAgent", {
    params
  });
};

export const getSettlementState = (params?) => {
  return http.request("get", "/api/constantList/bankType", { params });
};

export const DownloadBySettlementAgent = (params, axiosConfig) => {
  return http.request(
    "get",
    "/api/business/lg_salary_payment_schedule_commission/commissionDownloadBySettlement",
    { params },
    axiosConfig
  );
};

export const getListDtlAgent = id => {
  return http.request(
    "get",
    `/api/business/commission_settlement/getInfo/${id}`
  );
};
export const getListDtl = params => {
  return http.request("get", `/api/business/commission_settlement/listDtl`, {
    params
  });
};

export const getListByAgent = params => {
  return http.request(
    "get",
    `/api/business/salary_payment_schedule/listByAgent`,
    { params }
  );
};


export const getSalaryByAgent = params => {
  return http.request(
    "get",
    `/api/business/lg_salary_payment_schedule_commission/listByAgent`,
    { params }
  );
};

export const getSalarySettlementState = (params?) => {
  return http.request(
    "get",
    `/api/constantList/salarySettlementState`,
    { params }
  );
};
